Skip to content

Increase test coverage, fix NaN#93

Open
AshtonSBradley wants to merge 7 commits intoJuliaMath:masterfrom
AshtonSBradley:increase-testing
Open

Increase test coverage, fix NaN#93
AshtonSBradley wants to merge 7 commits intoJuliaMath:masterfrom
AshtonSBradley:increase-testing

Conversation

@AshtonSBradley
Copy link
Copy Markdown

@AshtonSBradley AshtonSBradley commented Apr 15, 2026

This PR increases test coverage to address #30. Coverage is up ~3% for the package and special cases are addressed more thoroughly. @dlfivefifty @MikaelSlevinsky I hope this helps package robustness.

This PR should also close #73 and #79. Both were caused by finite terminating hypergeometric series being routed through generic evaluation paths that could hit 0/0-style intermediate states and return NaN; this branch now detects those terminating cases and evaluates the finite sum directly.

It also adds regression coverage for the _₂F₁ special-case behaviour tied to #86 so should help resolve it.

Coverage-wise, this PR also helps address #30 by adding direct tests for internal helper functions, explicit _₂F₁ special-case branches, and issue-driven regression blocks. Improved coverage also directly helps #61, #63, #40

It reorganizes the suite so coverage is easier to reason about and maintain. The old monolithic test/runtests.jl is now split into feature-focused files for special-function helpers, broad algorithm sweeps, confluent-function coverage, and regression/boundary tests. That makes it much easier to see what behavior each block is protecting and to add issue-driven tests without burying them in a giant file.

It adds targeted high-signal tests around behavior that was previously thinly covered. In particular:

  • exact identity tests for short-circuit paths like M(a,a,z) = exp(z), pFq((3,),(),z) = (1-z)^(-3), and several _₂F₁ dispatch identities
  • singular and near-singular parameter checks, including DomainError behavior, Inf/NaN cases at argument unity, and comparisons against BigFloat near problematic parameter values
  • branch-cut consistency tests that verify conjugation symmetry for real-parameter evaluations of ₁F₀, M, and _₂F₁ when approaching the real axis from above and below
  • dedicated confluent coverage for U, plus new regression-oriented checks around nearby sensitive parameter regimes.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.88%. Comparing base (1bea052) to head (2dd7b56).

Files with missing lines Patch % Lines
src/specialfunctions.jl 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   84.89%   87.88%   +2.98%     
==========================================
  Files           7        7              
  Lines        1470     1502      +32     
==========================================
+ Hits         1248     1320      +72     
+ Misses        222      182      -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AshtonSBradley AshtonSBradley changed the title Increase test coverage Increase test coverage, fix NaN Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pFq falsely evaluates to NaN

1 participant